//
//  AlarmModel.swift
//  Kosspot
//
//  Created by 李鑫 on 2025/7/23.
//

import Foundation
import UTEBluetoothRYApi

struct AlarmModel: Codable {
    let cycle: Int
    let enable: Bool
    let index: Int
    let name: String
    let time: Int
    let timeHour: Int
    let timeMin: Int
    
    func toUTEModelClock() -> UTEModelClock {
        let device = UTEModelClock()
        device.cycle = Int32(self.cycle)
        device.enable = self.enable
        device.index = self.index
        device.name = self.name
        device.timeHour = self.timeHour
        device.timeMin = self.timeMin
        return device
    }
}
